package secondStage.part3.泛型.泛型方法;

/**
 * @ClassName: [GenericDemo2]
 * @Description: Generic泛型方法
 * @Author: [黄劲松]
 * @CreateDate: [2021-04-03]
 * @Version: [v1.0]
 */
public class GenericDemo2 {
    public static void main(String[] args) {
/*        Generic g = new Generic();
        g.show("张敏");
        g.show(123);
        g.show(true);*/
/*        System.out.println("泛型类使用");
        Generic<String> g1 = new Generic();
        g1.show("张敏");
        Generic<Integer> g2 = new Generic();
        g2.show(123);
        Generic<Boolean> g3 = new Generic();
        g3.show(true);
        Generic<Double> g4= new Generic();
        g4.show(12.34);*/
        System.out.println("泛型方法使用：");
        Generic g = new Generic();
        g.show("黄先生");
        g.show(1213);
        g.show(true);
        g.show(12.34);
    }
}
